package section11;
class MyThred extends Thread{
    private String who;
    public MyThred(String str){
        who=str;
    }


    public void run(){
        for(int i=0;i<5;i++){
            try{
                sleep((int)(1000*Math.random()));
            }
            catch(InterruptedException e){}
            System.out.println(who+"正在运行！");
        }
    }
}
public class App11_1 {
    public static void main(String[] args) {
        MyThred you=new MyThred("欢喜");
        MyThred me=new MyThred("囹圄");
        you.start();
        me.start();
        System.out.println("主方法main（）运行结果！");
    }
}
